Skip to content

Conversation

@YunYouJun
Copy link
Contributor

@YunYouJun YunYouJun commented Feb 5, 2025

Description

In scripts/postbuild.ts, code = code.replace('exports.default =', 'module.exports =') caused an incorrect replace.

webpack.cjs:

- exports.default = _chunk5FDDXNAEcjs.webpack_default;
+ module.exports = _chunk5FDDXNAEcjs.webpack_default;
// after replace, exports.default is undefined
module.exports = exports.default;

I tested that today we don't need this replacement to work properly.

At the same time, if it is not removed, it will result in cjs require undefined.

Linked Issues

Additional context

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@antfu antfu merged commit 3ff0bd1 into unplugin:main Feb 5, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants